<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Editor</title>
    <script src="{{winapi}}"></script>
    <link rel="stylesheet" href="{{static}}/css/editor.css">
    <script src="
        {{static}}/monaco/min/vs/loader.js
        "></script>
    <script>
        require.config({ paths: { 'vs': location.protocol + "//" + location.host + '{{static}}/monaco/min/vs' } });
        require.config({ 'vs/nls': { availableLanguages: { '*': 'zh-cn' } } });
        const API_PATH = "{{api}}"
    </script>
    <script src="
            {{static}}/js/editor.js
            "></script>

</head>

<body>
    <!-- 菜单栏 -->
    <div id="header">
        <button id="header-button-open" class="header-button" type="button" onclick="open_file_window()">打开</button>
        <button id="header-button-save" class="header-button" type="button" onclick="save_file()">保存</button>
        <button id="header-button-saveas" class="header-button" type="button" onclick="save_as_file()">另存</button>
        <button id="header-button-encoding" class="header-button" type="button" onclick="set_encoding()">编码</button>
        <button id="header-button-reload" class="header-button" type="button" onclick="reload_file()">重载</button>
    </div>
    <div id="header-split"></div>

    <!-- 编辑器 -->
    <div id="container"></div>
</body>

</html>